<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>

<head>
<title>GetPluginDirList</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../styles/styles.css">
<script language="javascript" src='../links.js' type="text/javascript"></script>
</head>

<body>

<h1>GetPluginDirList</h1>
<div class=navbar>
<a href="../index.html">main</a> |
<a href="index.html">service functions</a><br>
</div>

<div class=shortdescr>
The <dfn>GetPluginDirList</dfn> function returns list of files in the specified directory
(including subdirectories) in the file system emulated by a plugin.
</div>

<pre class=syntax>
int WINAPI GetPluginDirList(
  int PluginNumber,
  HANDLE hPlugin,
  const char *Dir,
  struct PluginPanelItem **pPanelItem,
  int *pItemsNumber
);
</pre>
<h3>Parameters</h3>
<div class=descr>
  <div class=dfn>PluginNumber</div>
  <div class=dfndescr>Number of the plugin module. It is passed to the plugin in the
     <a href="../exported_functions/setstartupinfo.html">SetStartupInfo</a> function.</div>
  <div class=dfn>hPlugin</div>
  <div class=dfndescr>Current plugin instance handle. If the plugin handle is equal to
  INVALID_HANDLE_VALUE, the value of PluginNumber is ignored and the function works with the plugin
  that controls the active panel.</div>
  <div class=dfn>Dir</div>
  <div class=dfndescr>Name of the plugin directory to scan. It must be in the form acceptable by the
    <a href="../exported_functions/setdirectory.html">SetDirectory</a> function of the plugin.
    <p>To keep the current plugin directory unchanged after the
    <dfn>GetPluginDirList</dfn> call, either <em>Dir</em> has to be a subdirectory of the current
    plugin directory, or the <a href="../exported_functions/setdirectory.html">SetDirectory</a>
    function of the plugin must be able to process a directory name returned by
    <a href="../exported_functions/getopenplugininfo.html">GetOpenPluginInfo</a>.
    Otherwise the current directory will be changed and you should be ready to restore it.</div>
  <div class=dfn>pPanelItem</div>
  <div class=dfndescr>oints to the variable that will receive the address of an array of
    <a href="../structures/pluginpanelitem.html">PluginPanelItem</a> structures.<br>
    When this array is no longer needed, it must be passed to the
    <a href="freedirlist.html">FreeDirList</a> function.</div>
  <div class=dfn>pItemsNumber</div>
  <div class=dfndescr>Points to the variable that will receive the count of
    <a href="../structures/pluginpanelitem.html">PluginPanelItem</a> structures.</div>
</div>

<h3>Return value</h3>
<div class=descr>
  If the function succeeds, the return value is TRUE.
  If the function fails or directory scanning is
  cancelled by the user, FALSE is returned.
</div>

<h3>Remarks</h3>
<div class=descr>
<ol>
<li>Returned file names are relative to the specified directory. For example, if
<dfn>Dir</dfn> is <code>D:\DIR1\DIR2</code>, file names will be in DIR2\file.ext format.
<li>The user can interrupt the directory scanning process by pressing Esc,
which will cause the function to return FALSE.
</ol>
</div>

<div class=see>See also:</div><div class=seecont>
<a href="getdirlist.html">GetDirList</a>
</div>

</body>
</html>